﻿#pragma once
#include <QSettings>
#include <QDebug>
#include "Singleton.h"
class Settings :public QObject, public Singleton<Settings>
{
    Q_OBJECT
        friend class Singleton<Settings>;
public slots:
    void SyncSettings();
public:
    void SetValue(const QString& key, const QVariant& value);
    QVariant Getvalue(const QString& key, const QVariant& defaultValue = QVariant())const;
private:
    Settings() {}
    QSettings m_settings{ "SpyderSettings.ini", QSettings::IniFormat };
    QMap<QString, QVariant> m_settingMap;
};

